home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 526-550 / disk_528 / keymenu / src.lzh / KeyMenu-Handler.i < prev    next >
Text File  |  1991-08-03  |  4KB  |  94 lines

  1. remove_event        equ                 1
  2. pass_event_on       equ                 0
  3. req_offsprite       equ                 -1
  4. req_onsprite        equ                 -2
  5. req_stopped         equ                 -3
  6. AbsExecBase         equ                 4
  7.  
  8.                     extern_lib Permit
  9.  
  10.                     ;
  11.                     ; gb_flags definitions
  12.                     ;
  13.                     bitdef  FLAG,AKey_down,0
  14.                     bitdef  FLAG,MActive,1
  15.                     bitdef  FLAG,Clear_rmbtrap,2
  16.                     bitdef  FLAG,Stop_requested,3
  17.                     bitdef  FLAG,Stopped,4
  18.                     bitdef  FLAG,Events_inserted,5
  19.                     bitdef  FLAG,Repeat_skipped,6
  20.                     bitdef  FLAG,Blank_pointer,7
  21.  
  22.                     ;
  23.                     ; gb_flags2 definitions
  24.                     ;
  25.                     bitdef  FLAG,ASC,0
  26.                     bitdef  FLAG,Release2,1
  27.                     bitdef  FLAG,Blanked,2
  28.  
  29.                     ;
  30.                     ; misc. flags
  31.                     ;
  32.                     bitnum  MENUSTATE,MENUSTATE
  33.                     bitnum  RMBTRAP,RMBTRAP
  34.                     bitnum  IECODE_UP_PREFIX,IECODE_UP_PREFIX
  35.                     bitnum  V_HIRES,V_HIRES
  36.                     bitnum  V_LACE,V_LACE
  37.                     bitnum  IEQUALIFIER_REPEAT,IEQUALIFIER_REPEAT
  38.  
  39. portname            macro   * name         
  40. %1                  dc.b    'KeyMenu V1.05',0
  41.                     endm
  42.  
  43.     structure Global_data,0
  44.         struct  gb_Port,MP_SIZE             ; msg port
  45.         aptr    gb_Segment                  ; handler segment
  46.         struct  gb_handler,IS_SIZE          ; area for input handler
  47.         aptr    gb_IBase                    ; Intuition Library base
  48.         aptr    gb_handtask                 ; handler task
  49.         aptr    gb_task                     ; keymenu task
  50.         aptr    gb_window                   ; current window
  51.         aptr    gb_menu                     ; First Menu
  52.         aptr    gb_currentmenu              ; current Menu
  53.         aptr    gb_currentitem              ; current MenuItem
  54.         aptr    gb_currentsubitem           ; current SubItem
  55.         struct  gb_ppos1,ie_SIZEOF          ; pointerpos event area
  56.         struct  gb_ppos2,ie_SIZEOF          ; pointerpos event area
  57.         struct  gb_rawm,ie_SIZEOF           ; rawmouse event area
  58.         struct  gb_pp1,IEPointerPixel_SIZEOF ; Position info for NEWPOINTERPOS
  59.         struct  gb_pp2,IEPointerPixel_SIZEOF ; "        "    "   "
  60.         word    gb_old_MouseX               ; mouse coordinates before
  61.                                             ; menu was activated
  62.         word    gb_old_MouseY
  63.         ubyte   gb_waitcnt                  ; activation sequence wait counter
  64.         ubyte   gb_flags                    ; various status flags
  65.                                             ;  - AKey_down
  66.                                             ;  - MActive
  67.                                             ;  - Clear_rmbtrap
  68.                                             ;  - stop_requested
  69.                                             ;  - events inserted
  70.                                             ;  - repeat skipped
  71.                                             ;  - Blank pointer
  72.         ubyte   gb_flags2                   ; more flags
  73.                                             ;  - activation sequence complete
  74.                                             ;  - Release 2.0
  75.                                             ;  - Blanked
  76.         ubyte   gb_AKey                     ; Menu activation key
  77.         ubyte   gb_DKey                     ; Menu deactivation key
  78.         ubyte   gb_SKey                     ; Menu select key
  79.         ubyte   gb_UpKey                    ; Up key
  80.         ubyte   gb_DownKey                  ; Down key
  81.         ubyte   gb_LeftKey                  ; Left key
  82.         ubyte   gb_RightKey                 ; Right key
  83.         ubyte   gb_Qual                     ; qualifier(s)
  84.         ubyte   gb_tasksignum               ; keymenu signal number
  85.         label   gb_size
  86.  
  87.     structure Item_def,0
  88.         aptr    im_NextItem
  89.         word    im_LeftEdge
  90.         word    im_TopEdge
  91.         word    im_Width
  92.         word    im_Height
  93.         label   im_size
  94.